<%@page import="helpers.LanguageHelper"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="helpers.StringHelper"%>
<%@page import="java.util.TreeMap"%>
<%
String success = (String) request.getAttribute("success");
TreeMap check = (TreeMap) request.getAttribute("check");
TreeMap values = (TreeMap) request.getAttribute("values");
LanguageHelper translate = (LanguageHelper) request.getAttribute("translate");

//Set content for seo
String nameServer = UrlHelper.getDomainServer(request);
String title = "Contact - " + nameServer;
String description = "We would love to hear from you, please use the contact form below to send us an email or alternatively contact us on one of the other methods below";
String keywords = "contact, contact us, article, about article, submit article";
String url = UrlHelper.getServerUrl(request) + "/contact";
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/templates/classic/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>
		
		<div id="wrapper">
			<div id="page-title">
				<div id="page-title-inner">
					<div class="container">
						<h2>Contact</h2>
					</div>
				</div>	
			</div>
			
			
			<div class="row-fluid">
				<div class="span8 left-content">
					<div class="title">
						<h3>Contact Us</h3>
					</div>
					<% if (success != null) { %>
					<div class="alert alert-success">
						<button type="button" class="close" data-dismiss="alert">&times;</button>
					  	<%=success %>
					</div>
					<% } %>
					<p>We would love to hear from you, please use the contact form below to send us an email or alternatively contact us on one of the other methods below:</p>
					<form method="post">
						<div class="row-fluid">
							<div class="span6">
								<div class="control-group <%=check.get("name") != null ? "error" : "" %>">
									<label>Your name</label>
				                    <input type="text" placeholder="" class="span11" name="name" data-original-title="" value="<%=values.get("name") != null ? values.get("name") : "" %>">
				                    <% if (check.get("name") != null ) { %>
				                    <span class="help-inline"><%=check.get("name") %></span>
				                    <% } %>
			                    </div>
			                </div>
			                
			                <div class="span6">
			                    <div class="control-group <%=check.get("email") != null ? "error" : "" %>">
				                    <label>Your email address</label>
				                    <input type="text" placeholder="" class="span12 email" name="email" value="<%=values.get("email") != null ? values.get("email") : "" %>" data-original-title="">
				                    <% if (check.get("email") != null ) { %>
				                    <span class="help-inline"><%=check.get("email") %></span>
				                    <% } %>
			                    </div>
			                </div>
			            </div>
			            <div class="row-fluid">    
			                <div class="span12">
								<div class="control-group <%=check.get("title") != null ? "error" : "" %>">
									<label>Message Title</label>
				                    <input type="text" placeholder="" class="span12" name="title" value="<%=values.get("title") != null ? values.get("title") : "" %>" data-original-title="">
				                    <% if (check.get("title") != null ) { %>
				                    <span class="help-inline"><%=check.get("title") %></span>
				                    <% } %>
				                </div>
			                    
			                    <div class="control-group <%=check.get("content") != null ? "error" : "" %>">
									<label>Message Content</label>
				                    <textarea placeholder="" rows="7" name="content" class="span12" data-original-title=""><%=values.get("content") != null ? values.get("content") : "" %></textarea>
				                    <% if (check.get("content") != null ) { %>
				                    <span class="help-inline"><%=check.get("content") %></span>
				                    <% } %>
				                </div>
							</div>
			            </div>
			            <div class="row-fluid">
			                <div class="span12">    
			                    <div class="control-group <%=check.get("captcha") != null ? "error" : "" %>">
	                                <script>
							        	var RecaptchaOptions = { theme : 'white'};
							  		</script>
									<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6LeA0c4SAAAAAMsdjrB49GPol6XImTdJM2U2AHrF"></script>
									<% if (check.get("captcha") != null ) { %>
				                    <span class="help-inline"><%=check.get("captcha") %></span>
				                    <% } %>
								</div>
			                    <div class="">
			                        <button class="btn btn-primary" type="submit">Send your message</button>
			                    </div>
							</div>
						</div>
					</form>
					
				</div>
				
				<jsp:include page="/templates/classic/elements/right.jsp" />
				
			</div>
		</div>

<jsp:include page="/templates/classic/layouts/footer.jsp" />